package com.neuedu.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neuedu.dao.LawsDao;
import com.neuedu.model.Laws;
import com.neuedu.service.LawsService;

@Service
public class LawsServiceImpl implements LawsService {

	// 依赖注入
	@Autowired
	private LawsDao LawsDao;
	
	public void setLawsDao(LawsDao LawsDao) {
		this.LawsDao = LawsDao;
	}
	
	@Override
	public int countLaws() {
		return LawsDao.countLaws();
	}

	@Override
	public List<Laws> findAll(Map<String, Object> map) {
		return LawsDao.findAll(map);
	}

	@Override
	public int addLaws(Laws u) {
		return LawsDao.addLaws(u);
	}

	@Override
	public int updateLaws(Laws u) {
		return LawsDao.updateLaws(u);
	}

	@Override
	public int deleteLaws(int id) {
		return LawsDao.deleteLaws(id);
	}

	@Override
	public Laws findOne(int id) {
		// TODO Auto-generated method stub
		return LawsDao.findOne(id);
	}

}